package org.dizena.shop.rpc;

import org.dizena.shop.rpc.dto.UserCmd;
import org.dizena.shop.rpc.dto.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.HttpEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "aat-center", path = "/center/user", contextId = "centerFeign")
public interface UserFeign {
    @GetMapping("/get/{id}")
    HttpEntity<UserVO> get(@PathVariable("id") String id);

    @PostMapping({"/post"})
    HttpEntity<UserVO> post(@RequestBody UserCmd cmd);

}